123456/PO PHP H5/Yannick - Matteo/Autodetails.php
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<html><h1>Team gegevens gegevens</h1></html>
<?php
include('db2.php');
$TeamleiderID = mysqli_real_escape_string($db, $_GET['TeamleiderID']);
$query = "SELECT c.*, r.* FROM Auto c INNER JOIN coureur r ON c.TeamleiderID = r.TeamleiderID WHERE c.TeamleiderID = '$TeamleiderID'";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)){
echo "<h2>{$row['TeamID']}</h2>";
echo "<div>{$row['TeamleiderID']}</div>";
echo "<div>{$row['Teamnaam']}</div>";
echo "<div>{$row['Opdrichtingsjaar']}</div>";
echo "<div>{$row['Voornaam']}</div>";
echo "<div>{$row['Achternaam']}</div>";
echo "<div>{$row['Nationaliteit']}</div>";
echo "<div>{$row['Geb_jaar']}</div>";
}
?>
<button id="button" onclick="location.href='coureur.php'">coureur</button>
<button id="button" onclick="location.href='Resultaten.php'">Resultaten</button>
<button id="button"onclick="location.href='Races.php'">Races</button>
<button id="button"onclick="location.href='Auto.php'">terug</button>
<button id="button"onclick="location.href='index.php'">homepagina</button>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse